<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>WingPick Pro - 内饰配置</title>
    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- FontAwesome -->
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <!-- 自定义配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#1976D2',
                        'primary-variant': '#0D47A1',
                        secondary: '#FF6F00',
                        'secondary-variant': '#E65100',
                        background: '#F5F5F5',
                        surface: '#FFFFFF',
                        'on-surface': '#212121',
                        'on-surface-variant': '#757575',
                        border: '#E0E0E0',
                        success: '#4CAF50',
                        warning: '#FFC107',
                        error: '#F44336',
                        info: '#2196F3'
                    }
                }
            }
        }
    </script>
    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .android-card {
                @apply bg-surface rounded-2xl shadow-sm p-4;
            }
            .android-button {
                @apply bg-primary text-white py-3 px-6 rounded-lg font-medium transition-all duration-200 active:scale-95;
            }
            .android-button-secondary {
                @apply bg-white text-primary border border-primary py-3 px-6 rounded-lg font-medium transition-all duration-200 active:scale-95;
            }
            .section-title {
                @apply text-xl font-semibold text-on-surface mb-3;
            }
            .radio-input {
                @apply w-5 h-5 rounded-full border-2 border-primary flex items-center justify-center cursor-pointer transition-all;
            }
            .radio-input-checked {
                @apply bg-primary;
            }
            .radio-input-checked::after {
                content: '';
                @apply w-2.5 h-2.5 rounded-full bg-white;
            }
            .checkbox-input {
                @apply w-5 h-5 rounded border-2 border-primary flex items-center justify-center cursor-pointer transition-all;
            }
            .checkbox-input-checked {
                @apply bg-primary;
            }
            .checkbox-input-checked::after {
                content: '✓';
                @apply text-white text-xs font-bold;
            }
            .step-indicator {
                @apply h-1 rounded-full flex-1 transition-all duration-300;
            }
            .step-indicator-active {
                @apply bg-primary;
            }
            .step-indicator-inactive {
                @apply bg-border;
            }
            .step-indicator-completed {
                @apply bg-primary;
            }
            .color-swatch {
                @apply w-10 h-10 rounded-full border-2 border-transparent cursor-pointer transition-all hover:scale-110 active:scale-95;
            }
            .color-swatch-selected {
                @apply border-primary;
            }
        }
    </style>
</head>
<body class="bg-background font-roboto text-on-surface min-h-screen">
    <!-- Android 状态栏 -->
    <div class="bg-primary h-7 w-full flex items-center justify-between px-4">
        <div class="text-white text-xs">18:30</div>
        <div class="flex items-center space-x-1">
            <i class="fa fa-signal text-white text-xs"></i>
            <i class="fa fa-wifi text-white text-xs"></i>
            <i class="fa fa-battery-three-quarters text-white text-xs"></i>
        </div>
    </div>

    <!-- 顶部导航栏 -->
    <header class="bg-primary text-white shadow-md">
        <div class="flex items-center h-14 px-4">
            <button id="backButton" class="mr-4">
                <i class="fa fa-arrow-left text-lg"></i>
            </button>
            <div class="text-lg font-semibold flex-1 text-center mr-4">配置报价</div>
        </div>
    </header>

    <!-- 步骤指示器 -->
    <div class="px-4 pt-4 pb-2">
        <div class="flex items-center justify-between mb-1">
            <span class="text-xs font-medium text-primary">2/4</span>
            <span class="text-xs font-medium text-on-surface-variant">内饰配置</span>
        </div>
        <div class="flex items-center space-x-2">
            <div class="step-indicator step-indicator-completed"></div>
            <div class="step-indicator step-indicator-active"></div>
            <div class="step-indicator step-indicator-inactive"></div>
            <div class="step-indicator step-indicator-inactive"></div>
        </div>
    </div>

    <!-- 产品信息 -->
    <div class="px-4 pb-4">
        <div class="android-card">
            <div class="flex items-center">
                <div class="w-16 h-16 rounded-lg overflow-hidden flex-shrink-0">
                    <img src="../../WingPick Pro/static/AC311A.png" alt="AC311A直升机" class="w-full h-full object-cover">
                </div>
                <div class="ml-3 flex-1">
                    <h2 class="font-semibold">AC311A</h2>
                    <p class="text-on-surface-variant text-sm">轻型多用途直升机</p>
                    <p class="text-primary font-medium">¥12,500,000</p>
                </div>
            </div>
        </div>
    </div>

    <!-- 主内容区 -->
    <main class="p-4 space-y-4 pb-24">
        <h1 class="text-xl font-bold mb-4">内饰配置</h1>
        
        <!-- 内饰风格选择 -->
        <div class="android-card">
            <h2 class="text-lg font-semibold mb-3">内饰风格</h2>
            
            <!-- 标准内饰 -->
            <div class="flex items-start mb-4 border-b border-border pb-3">
                <div class="radio-input radio-input-checked mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">标准商务内饰</h3>
                        <p class="font-medium text-primary">基础价格</p>
                    </div>
                    <p class="text-on-surface-variant text-sm">高级皮革座椅，橡木内饰，标准航空仪表</p>
                    <div class="mt-2 bg-background rounded-lg p-2">
                        <img src="https://images.unsplash.com/photo-1563430425174-50f35a0b8858?q=80&w=400&auto=format&fit=crop" alt="标准商务内饰" class="w-full h-32 object-cover rounded">
                    </div>
                </div>
            </div>

            <!-- 豪华内饰 -->
            <div class="flex items-start mb-4 border-b border-border pb-3">
                <div class="radio-input mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">豪华VIP内饰</h3>
                        <p class="font-medium text-primary">+¥450,000</p>
                    </div>
                    <p class="text-on-surface-variant text-sm">顶级真皮座椅，碳纤维内饰，高级航空电子设备</p>
                    <div class="mt-2 bg-background rounded-lg p-2">
                        <img src="https://images.unsplash.com/photo-1616356425851-1b3779571097?q=80&w=400&auto=format&fit=crop" alt="豪华VIP内饰" class="w-full h-32 object-cover rounded">
                    </div>
                </div>
            </div>

            <!-- 专业内饰 -->
            <div class="flex items-start">
                <div class="radio-input mt-1 mr-3 flex-shrink-0"></div>
                <div class="flex-1">
                    <div class="flex justify-between items-center mb-1">
                        <h3 class="font-semibold">专业任务内饰</h3>
                        <p class="font-medium text-primary">+¥280,000</p>
                    </div>
                    <p class="text-on-surface-variant text-sm">耐用布料座椅，额外任务设备安装点，增强型航空仪表</p>
                    <div class="mt-2 bg-background rounded-lg p-2">
                        <img src="https://images.unsplash.com/photo-1622364723009-8f8104d9b34b?q=80&w=400&auto=format&fit=crop" alt="专业任务内饰" class="w-full h-32 object-cover rounded">
                    </div>
                </div>
            </div>
        </div>

        <!-- 座椅材质与颜色 -->
        <div class="android-card">
            <h2 class="text-lg font-semibold mb-3">座椅材质与颜色</h2>
            
            <div class="mb-4">
                <h3 class="text-sm font-medium mb-2">颜色选择</h3>
                <div class="flex space-x-4">
                    <div class="flex flex-col items-center">
                        <div class="color-swatch color-swatch-selected bg-gray-800" data-color="black"></div>
                        <span class="text-xs mt-1">黑色</span>
                    </div>
                    <div class="flex flex-col items-center">
                        <div class="color-swatch bg-gray-200" data-color="light-gray"></div>
                        <span class="text-xs mt-1">浅灰</span>
                    </div>
                    <div class="flex flex-col items-center">
                        <div class="color-swatch bg-blue-800" data-color="navy-blue"></div>
                        <span class="text-xs mt-1">藏青</span>
                    </div>
                    <div class="flex flex-col items-center">
                        <div class="color-swatch bg-brown-700" data-color="tan"></div>
                        <span class="text-xs mt-1">棕褐色</span>
                    </div>
                </div>
            </div>

            <div>
                <h3 class="text-sm font-medium mb-2">额外功能</h3>
                <div class="space-y-3">
                    <div class="flex items-center">
                        <div class="checkbox-input checkbox-input-checked mr-3"></div>
                        <div class="flex-1">
                            <span class="font-medium">加热座椅</span>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <div class="checkbox-input checkbox-input-checked mr-3"></div>
                        <div class="flex-1">
                            <span class="font-medium">电动调节座椅</span>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <div class="checkbox-input mr-3"></div>
                        <div class="flex-1">
                            <span class="font-medium">座椅按摩功能</span>
                            <span class="text-xs text-primary ml-2">+¥45,000</span>
                        </div>
                    </div>
                    <div class="flex items-center">
                        <div class="checkbox-input mr-3"></div>
                        <div class="flex-1">
                            <span class="font-medium">可折叠工作桌</span>
                            <span class="text-xs text-primary ml-2">+¥32,000</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <!-- 娱乐与通讯系统 -->
        <div class="android-card">
            <h2 class="text-lg font-semibold mb-3">娱乐与通讯系统</h2>
            
            <div class="space-y-3">
                <div class="flex items-center">
                    <div class="checkbox-input checkbox-input-checked mr-3"></div>
                    <div class="flex-1">
                        <span class="font-medium">标准音频系统</span>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="checkbox-input checkbox-input-checked mr-3"></div>
                    <div class="flex-1">
                        <span class="font-medium">卫星通讯系统</span>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="checkbox-input mr-3"></div>
                    <div class="flex-1">
                        <span class="font-medium">高保真音响系统</span>
                        <span class="text-xs text-primary ml-2">+¥55,000</span>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="checkbox-input mr-3"></div>
                    <div class="flex-1">
                        <span class="font-medium">高清显示屏幕（每个座位）</span>
                        <span class="text-xs text-primary ml-2">+¥78,000</span>
                    </div>
                </div>
                <div class="flex items-center">
                    <div class="checkbox-input mr-3"></div>
                    <div class="flex-1">
                        <span class="font-medium">WiFi热点系统</span>
                        <span class="text-xs text-primary ml-2">+¥38,000</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- 底部操作按钮 -->
        <div class="fixed bottom-0 left-0 right-0 bg-surface p-4 border-t border-border">
            <div class="flex justify-between items-center mb-3">
                <span class="text-sm text-on-surface-variant">内饰价格:</span>
                <span id="currentPrice" class="text-xl font-semibold text-primary">¥0</span>
            </div>
            <div class="flex space-x-3">
                <button id="prevButton" class="android-button-secondary flex-1">
                    上一步
                </button>
                <button id="nextButton" class="android-button flex-1">
                    下一步: 设备配置
                </button>
            </div>
        </div>
    </main>

    <script>
        // 返回按钮点击事件
        document.getElementById('backButton').addEventListener('click', function() {
            window.location.href = 'config-engine.html';
        });

        // 上一步按钮点击事件
        document.getElementById('prevButton').addEventListener('click', function() {
            window.location.href = 'config-engine.html';
        });

        // 下一步按钮点击事件
        document.getElementById('nextButton').addEventListener('click', function() {
            // 跳转到设备配置页面
            window.location.href = 'config-equipment.html';
        });

        // 内饰风格选择
        const radioInputs = document.querySelectorAll('.radio-input');
        radioInputs.forEach(input => {
            input.addEventListener('click', function() {
                // 移除所有选中状态
                radioInputs.forEach(radio => {
                    radio.classList.remove('radio-input-checked');
                });
                // 设置当前选项为选中状态
                this.classList.add('radio-input-checked');
                
                // 这里可以根据选择更新价格
                updateTotalPrice();
            });
        });

        // 颜色选择
        const colorSwatches = document.querySelectorAll('.color-swatch');
        colorSwatches.forEach(swatch => {
            swatch.addEventListener('click', function() {
                // 移除所有选中状态
                colorSwatches.forEach(color => {
                    color.classList.remove('color-swatch-selected');
                });
                // 设置当前选项为选中状态
                this.classList.add('color-swatch-selected');
            });
        });

        // 复选框功能选择
        const checkboxInputs = document.querySelectorAll('.checkbox-input');
        checkboxInputs.forEach(checkbox => {
            checkbox.addEventListener('click', function() {
                // 切换选中状态
                this.classList.toggle('checkbox-input-checked');
                
                // 更新价格
                updateTotalPrice();
            });
        });

        // 价格计算函数
        function updateTotalPrice() {
            let totalPrice = 0;
            
            // 根据内饰风格计算
            if (radioInputs[1].classList.contains('radio-input-checked')) {
                totalPrice += 450000; // 豪华VIP内饰
            } else if (radioInputs[2].classList.contains('radio-input-checked')) {
                totalPrice += 280000; // 专业任务内饰
            }
            
            // 根据额外功能计算
            const checkboxes = document.querySelectorAll('.checkbox-input.checkbox-input-checked');
            checkboxes.forEach((checkbox, index) => {
                // 跳过默认包含的功能（前两个）
                if (index >= 2) {
                    // 根据位置判断价格
                    if (index === 2) totalPrice += 45000; // 座椅按摩
                    else if (index === 3) totalPrice += 32000; // 工作桌
                    else if (index === 5) totalPrice += 55000; // 高保真音响
                    else if (index === 6) totalPrice += 78000; // 高清屏幕
                    else if (index === 7) totalPrice += 38000; // WiFi热点
                }
            });
            
            // 更新价格显示
            const formattedPrice = new Intl.NumberFormat('zh-CN').format(totalPrice);
            document.getElementById('currentPrice').textContent = `¥${formattedPrice}`;
        }

        // 初始化时计算价格
        updateTotalPrice();
    </script>
</body>
</html>